package com.usian.service;

import com.usian.common.untils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @projectName: 2210A-project1
 * @package: com.usian.service
 * @className: CourseDetailsFeignService
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: TODO
 * @date: 2023/8/31 20:03
 */
@FeignClient("day04CourseDetails")
public interface CourseDetailsFeignService {

    /**
     * 根据课程id查询目录方法
     * @param id
     * @return 返回目录集合(树形) Result.data.key -> list
     */
    @RequestMapping(value = "/course/findAllCatalog",method = RequestMethod.GET)
    public Result findAllCatalog(@RequestParam("id") Long id);

    /**
     * 根据成员id查询学习进度方法
     * @param id 成员id
     * @param courseId 课程id
     * @return 返回该成员学的目录id集合 Result.data.key -> catalogIds
     */
    @RequestMapping(value = "/course/findCatalogByMemberId",method = RequestMethod.GET)
    public Result findCatalogByMemberId(@RequestParam("id") Long id,
                                        @RequestParam("courseId") Long courseId);
}
